<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>数组解构</title>
</head>
<body>
	<script type="text/javascript">
		// 数组解构允许我们按照一一对应的关系从数组中提取值 然后将值赋值给变量
		let ary = [1,2,3];
		// let [a, b, c, d, e] = ary;
		// console.log(a)
		// console.log(b)
		// console.log(c)
		// console.log(d)
		// console.log(e)

	  // let newArr = ary.filter(function(item) {
		// 	return item < 2
		// })

		let newArr = ary.filter(item => item < 2)

		console.log(newArr)
	</script>
</body>
</html>